﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WLKC_Query.aspx.cs" Inherits="Web.Page.WLKC_Query" %>
<%@ Register TagPrefix="cc1" Namespace="Liaojy.UI.WebControls" Assembly="Liaojy.UI.WebControls" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="../Css/style.css" rel="stylesheet" type="text/css" />
        <style type="text/css">
        .style10
        {
            color: #528311;
            font-size: 12px;
            text-align: right;
            width: 43px;
            font-weight: bold;
        }
            .style13
            {
                width: 200px;
            }
            .style14
            {
                width: 190px;
            }
            .style15
            {
                color: #528311;
                font-size: 12px;
                text-align: right;
            }
            .style16
            {
                color: #528311;
                font-size: 12px;
                text-align: right;
            }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>

        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
         <tr>
                    <td >
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td width="15" >
                                    <img src="../images/tab_03_1.gif" width="15"  />
                                </td>
                                <td style="text-align:left; vertical-align:bottom" width="100%" background="../images/tab_05_1.gif">
                                &nbsp;<cc1:HoverButton id="btnAdd" runat="server" MouseOverImageUrl="../images/btn_add1.png" ImageUrl="../images/btn_add0.png" MouseDownImageUrl="../images/btn_add2.png" onclick="btnAdd_Click"
				></cc1:HoverButton>
                </td>
                                <td width="14">
                                    <img src="../images/tab_07_1.gif" width="14"  />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>

                 <tr>
                    <td >
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td width="15" >
                                    <img src="../images/tab_20_1.gif" width="15"  />
                                </td>
                                <td background="../images/tab_21_1.gif">
                                </td>
                                <td width="14">
                                    <img src="../images/tab_22_1.gif" width="14"  alt="" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
        </table>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                    <td height="30">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td width="15" height="30">
                                    <img src="../images/tab_03.gif" width="15" height="30" />
                                </td>
                                <td width="1101" background="../images/tab_05.gif">

                                    &nbsp;&nbsp;<span class="style10">查询条件</span></td>
                               <td width="281" background="../images/tab_05.gif" align="right">
                                    &nbsp;</td>
                                <td width="14">
                                    <img src="../images/tab_07.gif" width="14" height="30" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>

                <tr>
                    <td>
                     <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td width="9" background="../images/tab_12.gif">
                                    &nbsp;
                                </td>
                                 <td bgcolor="#f3ffe3">
                                
                                   <table border="0" width="100%" style="height: 100%;">
                                        <tr>
                                            <td class="label" style="width:100px">物料类型</td>
                                            <td style="text-align: left;">
                                                &nbsp;<asp:DropDownList ID="ddlWLLX" runat="server" CssClass="dropdown" >
                                                </asp:DropDownList>
                                                &nbsp;</td>
                                            <td class="label" style="width:120px">供应商名称</td>
                                            <td style="text-align: left;">
                                                &nbsp;<asp:DropDownList ID="ddlGYS" runat="server" CssClass="dropdown">
                                                </asp:DropDownList>
                                                &nbsp;</td>
                                            <td style="width: 100px;" class="label">物料名称</td>
                                            <td style="text-align: left;">
                                                &nbsp;<asp:TextBox ID="txtMC" runat="server" CssClass="textbox" Width=80px></asp:TextBox>
                                                &nbsp;</td>
                                            <td class="style15">仓库</td>
                                            <td style="text-align: left;">
                                                &nbsp;<asp:DropDownList ID="ddlCKID" runat="server" CssClass="dropdown">
                                                </asp:DropDownList>
                                                &nbsp;</td>
                                            <td class="style16">仓位</td>
                                            <td style="text-align: left;" class="style13">
                                                &nbsp;<asp:DropDownList ID="ddlCWID" runat="server" CssClass="dropdown">
                                                </asp:DropDownList>
                                                &nbsp;</td>                                     
                                            <td class="label">                                                
                                                <cc1:HoverButton ID="btnQuery" runat="server" 
                                                    ImageUrl="../images/btn_query0.png" 
                                                    MouseDownImageUrl="../images/btn_query2.png" 
                                                    MouseOverImageUrl="../images/btn_query1.png" onclick="btnQuery_Click" 
                                                    TabIndex="1" />
                                                </td>
                                        <td >
                                                &nbsp;</td>
                                        </tr>
                                        </table>
                                    
                                 </td>
                                  <td width="9" background="../images/tab_16.gif">
                                    &nbsp;
                                </td>
                                </tr>
                                </table>
                    </td>
                    </tr>


                <tr>
                    <td height="29">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td width="15" height="29">
                                    <img src="../images/tab_20.gif" width="15" height="29" />
                                </td>
                                <td background="../images/tab_21.gif">                                    
                                </td>
                                <td width="14">
                                    <img src="../images/tab_22.gif" width="14" height="29" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                    <td height="30">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0" 
                            style="height: 28px">
                            <tr>
                                <td width="15" height="30">
                                    <img src="../images/tab_03.gif" width="15" height="30" />
                                </td>
                                <td width="1101" background="../images/tab_05.gif">
                                    <img src="../images/311.gif" width="16" height="16" />
                                    <span class="STYLE4">
                                        <asp:Label ID="lbTitle" runat="server" CssClass="title">物料库存列表</asp:Label>&nbsp;</span><asp:Label
                                            ID="lbResult" runat="server" Font-Size="9pt" ForeColor="#FF3300"></asp:Label>                                                                  
                                </td>
<asp:HiddenField ID="hdOp" runat="server" Visible="False" Value="01" />   
                               <td width="281" background="../images/tab_05.gif" align="right">
                                    &nbsp;</td>
                                <td width="14">
                                    <img src="../images/tab_07.gif" width="14" height="30" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>

                <tr>
                    <td>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td width="9" background="../images/tab_12.gif">
                                    &nbsp;
                                </td>
                                <td bgcolor="#f3ffe3">
                                    <table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#c0de98"
                                        >
                                        <tr id="list">
                                            <td colspan="4" style="background: #FFFFFF; text-align: left;" valign="top">
                                                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" AllowPaging="True"
                                                    OnPageIndexChanged="GridView1_PageIndexChanged" OnPageIndexChanging="GridView1_PageIndexChanging"
                                                    CellPadding="3" CellSpacing="1" HorizontalAlign="Left" Width="100%" OnRowDataBound="GridView1_RowDataBound"
                                                    OnRowDeleting="GridView1_RowDeleting" DataKeyNames="ID" PageSize="25">
                                                    <Columns>
                                                        <asp:BoundField DataField="LXMC" HeaderText="物料类型">
                                                            <FooterStyle BorderColor="#00CC00" BorderStyle="Solid" />
                                                            <HeaderStyle BorderColor="#00CC00" BorderStyle="Solid" CssClass="STYLE2" Font-Bold="True"
                                                                Font-Size="9pt" Height="20px" HorizontalAlign="Center" BackColor="#CAE0AC" VerticalAlign="Middle" />
                                                            <ItemStyle Font-Size="9pt" BorderColor="#00CC00" BorderStyle="Solid" />
                                                        </asp:BoundField>       
                                                        <asp:BoundField DataField="BH" HeaderText="物料编号">
                                                            <FooterStyle BorderColor="#00CC00" BorderStyle="Solid" />
                                                            <HeaderStyle BorderColor="#00CC00" BorderStyle="Solid" CssClass="STYLE2" Font-Bold="True"
                                                                Font-Size="9pt" Height="20px" HorizontalAlign="Center" BackColor="#CAE0AC" VerticalAlign="Middle" />
                                                            <ItemStyle Font-Size="9pt" Width="100px" BorderColor="#00CC00" BorderStyle="Solid" />
                                                        </asp:BoundField>       
                                                       <asp:HyperLinkField DataNavigateUrlFields="ID" 
                                                            DataNavigateUrlFormatString="WLKC_Edit.aspx?id={0}&amp;op=01" DataTextField="MC" 
                                                            HeaderText="物料名称" >
                                                            <FooterStyle BorderColor="#00CC00" BorderStyle="Solid" />
                                                            <HeaderStyle BorderColor="#00CC00" BorderStyle="Solid" CssClass="STYLE2" Font-Bold="True"
                                                                Font-Size="9pt" Height="20px" HorizontalAlign="Center" BackColor="#CAE0AC" VerticalAlign="Middle" />
                                                            <ItemStyle Font-Size="9pt" Width="120px" BorderColor="#00CC00" BorderStyle="Solid" HorizontalAlign="Center" />
                                                        </asp:HyperLinkField>
                                                        <asp:BoundField DataField="GG" HeaderText="物料规格">
                                                            <FooterStyle BorderColor="#00CC00" BorderStyle="Solid" />
                                                            <HeaderStyle BorderColor="#00CC00" BorderStyle="Solid" CssClass="STYLE2" Font-Bold="True"
                                                                Font-Size="9pt" Height="20px" HorizontalAlign="Center" BackColor="#CAE0AC" VerticalAlign="Middle" />
                                                            <ItemStyle Font-Size="9pt" Width="100px" BorderColor="#00CC00" BorderStyle="Solid" />
                                                        </asp:BoundField>       
                                                        <asp:TemplateField>
                                                            <HeaderTemplate>入库<br />单位</HeaderTemplate>
                                                            <ItemTemplate><%# Eval("DWMC")%></ItemTemplate>
                                                            <FooterStyle BorderColor="#00CC00" BorderStyle="Solid" />
                                                            <HeaderStyle BorderColor="#00CC00" BorderStyle="Solid" CssClass="STYLE2" Font-Bold="True"
                                                                Font-Size="9pt" Height="20px" HorizontalAlign="Center" 
                                                            BackColor="#CAE0AC" VerticalAlign="Middle" />
                                                            <ItemStyle Font-Size="9pt" BorderColor="#00CC00" HorizontalAlign=Center BorderStyle="Solid" Width=30px />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField>
                                                            <HeaderTemplate>库存<br />数量</HeaderTemplate>
                                                            <ItemTemplate><%# Convert.ToDecimal(Eval("SL")).ToString("F")%></ItemTemplate>
                                                            <FooterStyle BorderColor="#00CC00" BorderStyle="Solid" />
                                                            <HeaderStyle BorderColor="#00CC00" BorderStyle="Solid" CssClass="STYLE2" Font-Bold="True"
                                                                Font-Size="9pt" Height="20px" HorizontalAlign="Center" 
                                                            BackColor="#CAE0AC" VerticalAlign="Middle" />
                                                            <ItemStyle Font-Size="9pt" BorderColor="#00CC00" BorderStyle="Solid" HorizontalAlign=Center />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField>
                                                            <HeaderTemplate>平均<br />单价</HeaderTemplate>
                                                            <ItemTemplate><%# Convert.ToDecimal(Eval("PJDJ")).ToString("0.0000")%></ItemTemplate>
                                                            <FooterStyle BorderColor="#00CC00" BorderStyle="Solid" />
                                                            <HeaderStyle BorderColor="#00CC00" BorderStyle="Solid" CssClass="STYLE2" Font-Bold="True"
                                                                Font-Size="9pt" Height="20px" HorizontalAlign="Center" 
                                                            BackColor="#CAE0AC" VerticalAlign="Middle"/>
                                                            <ItemStyle Font-Size="9pt" BorderColor="#00CC00" BorderStyle="Solid" Width=40px />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="金额">
                                                            <FooterStyle BorderColor="#00CC00" BorderStyle="Solid" />
                                                            <HeaderStyle BorderColor="#00CC00" BorderStyle="Solid" CssClass="STYLE2" Font-Bold="True"
                                                                Font-Size="9pt" Height="20px" HorizontalAlign="Center" 
                                                            BackColor="#CAE0AC" VerticalAlign="Middle" />
                                                            <ItemStyle Font-Size="9pt" BorderColor="#00CC00" BorderStyle="Solid" Width=40px />
                                                            <ItemTemplate><%# (Convert.ToDecimal(Eval("PJDJ")) * Convert.ToDecimal(Eval("SL"))).ToString("F")%></ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField>
                                                            <HeaderTemplate>最新<br />单价</HeaderTemplate>
                                                            <ItemTemplate><%# Convert.ToDecimal(Eval("ZXDJ")).ToString("F")%></ItemTemplate>
                                                            <FooterStyle BorderColor="#00CC00" BorderStyle="Solid" />
                                                            <HeaderStyle BorderColor="#00CC00" BorderStyle="Solid" CssClass="STYLE2" Font-Bold="True"
                                                                Font-Size="9pt" Height="20px" HorizontalAlign="Center" 
                                                            BackColor="#CAE0AC" VerticalAlign="Middle"/>
                                                            <ItemStyle Font-Size="9pt" BorderColor="#00CC00" BorderStyle="Solid" Width=40px HorizontalAlign=Center />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField>
                                                            <HeaderTemplate>安全<br />库存</HeaderTemplate>
                                                            <ItemTemplate><%# Convert.ToDecimal(Eval("AQKCSL")).ToString("F")%></ItemTemplate>
                                                            <FooterStyle BorderColor="#00CC00" BorderStyle="Solid" />
                                                            <HeaderStyle BorderColor="#00CC00" BorderStyle="Solid" CssClass="STYLE2" Font-Bold="True"
                                                                Font-Size="9pt" Height="20px" HorizontalAlign="Center" 
                                                            BackColor="#CAE0AC" VerticalAlign="Middle" />
                                                            <ItemStyle Font-Size="9pt" BorderColor="#00CC00" BorderStyle="Solid" HorizontalAlign=Center />
                                                        </asp:TemplateField>                                                        
                                                        <asp:BoundField DataField="GYSMC" HeaderText="供应商">
                                                            <FooterStyle BorderColor="#00CC00" BorderStyle="Solid" />
                                                            <HeaderStyle BorderColor="#00CC00" BorderStyle="Solid" CssClass="STYLE2" Font-Bold="True"
                                                                Font-Size="9pt" Height="20px" HorizontalAlign="Center" BackColor="#CAE0AC" VerticalAlign="Middle" />
                                                            <ItemStyle Font-Size="9pt" Width="100px" BorderColor="#00CC00" BorderStyle="Solid" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="CKMC" HeaderText="仓库">
                                                            <FooterStyle BorderColor="#00CC00" BorderStyle="Solid" />
                                                            <HeaderStyle BorderColor="#00CC00" BorderStyle="Solid" CssClass="STYLE2" Font-Bold="True"
                                                                Font-Size="9pt" Height="20px" HorizontalAlign="Center" BackColor="#CAE0AC" VerticalAlign="Middle" />
                                                            <ItemStyle Font-Size="9pt" Width="100px" BorderColor="#00CC00" BorderStyle="Solid" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="CWBH" HeaderText="仓位">
                                                            <FooterStyle BorderColor="#00CC00" BorderStyle="Solid" />
                                                            <HeaderStyle BorderColor="#00CC00" BorderStyle="Solid" CssClass="STYLE2" Font-Bold="True"
                                                                Font-Size="9pt" Height="20px" HorizontalAlign="Center" BackColor="#CAE0AC" VerticalAlign="Middle" />
                                                            <ItemStyle Font-Size="9pt" Width="100px" BorderColor="#00CC00" BorderStyle="Solid" />
                                                        </asp:BoundField>
                                                        <asp:TemplateField InsertVisible="False" ShowHeader="False">
                                                            <ItemTemplate>
                                                                <asp:LinkButton ID="btnDelete" runat="server" CausesValidation="False" 
                                                                    CommandName="Delete" ImageUrl="~/images/del.png" 
                                                                    onclientclick="javascript:return confirm('您确认要删除吗？');" Text="删除"  />
                                                            </ItemTemplate>
                                                            <HeaderStyle BackColor="#CAE0AC" BorderColor="#00CC00" BorderStyle="Solid" />
                                                            <ItemStyle BorderColor="#00CC00" BorderStyle="Solid" HorizontalAlign="Center" 
                                                                VerticalAlign="Middle" Width="60px" />
                                                        </asp:TemplateField>
                                                    </Columns>
                                                    <FooterStyle BorderColor="#CAE0AC" BorderStyle="Solid" />
                                                    <PagerStyle CssClass="pageStyle" />
                                                </asp:GridView>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td width="9" background="../images/tab_16.gif">
                                    &nbsp;
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td height="29">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td width="15" height="29">
                                    <img src="../images/tab_20.gif" width="15" height="29" />
                                </td>
                                <td background="../images/tab_21.gif">
                                    <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                                        <ProgressTemplate>
                                            <img src="../images/indicator.gif" alt="加载中..." />&nbsp;&nbsp;Loading ...
                                        </ProgressTemplate>
                                    </asp:UpdateProgress>
                                </td>
                                <td width="14">
                                    <img src="../images/tab_22.gif" width="14" height="29" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>
